/*
 * @Description: 报表表格
 * @Author: Zzt
 * @Date: 2022-11-10 19:52:01
 * @LastEditTime: 2022-12-28 09:44:46
 */

import Table from 'antd/es/table';
const Tables = (props: any) => {
  const { data, tableList, ChangNo } = props;
  /**
   * @description 切换页码触发
   * @param {number} page 页码
   * @param {number} pageSize 每页条目数
   */
  const pageChange = (page: number, pageSize: number) => {
    ChangNo(page);
  };
  return (
    <>
      <Table
        dataSource={data?.results}
        columns={tableList}
        pagination={{
          total: data?.totalCount,
          onChange: pageChange
        }}
      ></Table>
    </>
  );
};
export default Tables;
